Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement issue #276 exclude certain URLs from checking, also impleme… #368

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

elebeida
Copy link

Implement issue #276 exclude certain URLs from checking, also implement hosts to exclude

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
52.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@ascheman
Copy link
Member

Thanks for your contribution, @elebeida. Could you please check the test coverage (cf. SonarQube report). I see some tests but mostly integration tests, but the exclusion logic should be covered by unit tests if possible.

Additionally, it would be nice if you could also add some documentation wrt the new parameters (README of Gradle Plugin).

@@ -11,6 +11,9 @@ htmlSanityCheck {

failOnErrors = true

urlsToExclude = [ "https://www.aim42.org/"]
hostsToExclude = [ "www.aim42.org" ]

logger.quiet "HSC version: ${htmlSanityCheckVersion}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The purpose of the self check is to check the HSC documentation itself.
And it should not exclude essential links in the documentation.

Please drop this.

<a href="http://included.com/page">Included Host</a>
</body>
</html>
"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can see these HTMLs are only used in HtmlSanityCheckTaskFunctionalSpec (despite the other final statics that are used in both derived classes. If the code is only used in one derived class, move it there please.

@ascheman
Copy link
Member

Please rethink the approach, @elebeida towards a regular expression based implementation.

Now that I look through your implementation and the original requirement of @rdmueller (who comes with a strong docToolchain back ground), I think that a regular expression is more general as it might cover URLs as well as Hosts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants